﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Heavy_Metals
{
    public partial class YJPDXX_ZJS : Form
    {
        public YJPDXX_ZJS()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            this.dataGridView1.Rows.Clear();
            this.dataGridView1.Rows.Add("砷", "A11", "有毒", "XX", "34", "呈XX色", "企业排放", "砷中毒", "查看");

            this.dataGridView2.Rows.Clear();
            this.dataGridView2.Rows.Add("砷", "Dd23");

            this.dataGridView3.Rows.Clear();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            this.textBox1.Text = "";
        }

        private void YJPDXX_ZJS_Load(object sender, EventArgs e)
        {
            DataGridViewLinkColumn lc = new DataGridViewLinkColumn();
            lc.HeaderText = "详细信息";
            lc.Name = "详细信息";
            lc.Width = 60;
            this.dataGridView1.Columns.Add("重金属名称", "重金属名称");
            this.dataGridView1.Columns.Add("对应CAS号", "对应CAS号");
            this.dataGridView1.Columns.Add("毒性", "毒性");
            this.dataGridView1.Columns.Add("水中本底值", "水中本底值");
            this.dataGridView1.Columns.Add("标准排放值", "标准排放值");
            this.dataGridView1.Columns.Add("监测方法", "监测方法");
            this.dataGridView1.Columns.Add("主要污染来源", "主要污染来源");
            this.dataGridView1.Columns.Add("危害描述", "危害描述");
            this.dataGridView1.Columns.Add(lc);
            this.dataGridView1.Rows.Add("砷","A11","有毒","XX","34","呈XX色","企业排放","砷中毒","查看");
            this.dataGridView1.Rows.Add("铬", "A12", "有毒", "", "", "", "", "", "查看");
            this.dataGridView1.Rows.Add("镉", "A13", "有毒", "", "", "", "", "XX病", "查看");

            this.dataGridView2.Columns.Add("类别名称", "类别名称");
            this.dataGridView2.Columns.Add("标准Id", "标准Id");
            this.dataGridView2.Rows.Add("砷", "Dd23");
            this.dataGridView2.Rows.Add("镉", "Dd25");

            DataGridViewLinkColumn lc1 = new DataGridViewLinkColumn();
            lc1.HeaderText = "详细信息";
            lc1.Name = "详细信息";
            lc1.Width = 60;
            this.dataGridView3.Columns.Add("重金属名称", "重金属名称");
            this.dataGridView3.Columns.Add("标准限值名", "标准限值名");
            this.dataGridView3.Columns.Add("标准限值", "标准限值");
            this.dataGridView3.Columns.Add("备注", "备注");
            this.dataGridView3.Columns.Add(lc1);
            this.dataGridView3.Rows.Add("铬","索福克勒斯","43","说XXX","查看");
            this.dataGridView3.Rows.Add("镉", "多看点开始", "23", "多给点","查看");
        }

        private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.ColumnIndex != -1)
            {
                if (this.dataGridView1.Columns[e.ColumnIndex].Name == "详细信息")
                {
                    YJPDXX_ZJS_XXXX xxxx = new YJPDXX_ZJS_XXXX();
                    xxxx.Show();
                }
            }
        }

        private void dataGridView3_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.ColumnIndex != -1)
            {
                if (this.dataGridView1.Columns[e.ColumnIndex].Name == "详细信息")
                {
                    YJPDXX_ZJS_XXXX xxxx = new YJPDXX_ZJS_XXXX();
                    xxxx.Show();
                }
            }
        }
    }
}
